package org.jackysoft.query;

public enum LogicRelation {
     并且("and"),或者("or");
     
     public static LogicRelation parse(String str){
    	 return Enum.valueOf(LogicRelation.class, str);
    	 
     }
         
     private String value;
     
     private LogicRelation(String label){
    	 this.value = label;
    	
     }
     
     @Override
     public String toString(){
    	 return this.value.toUpperCase();
     }  
     
     public static String getOptions(){
     	String opts = "";
     	for(LogicRelation c :LogicRelation.values()){
     		opts+=String.format("<option value='%s'>%s</option>", c.name(),c.name());
     	    		
     	}
     	return opts;
     	
     }
}
